//
//  PhysicalRecordCell.m
//  HarmonizePub
//
//  Created by rzhy on 2017/1/22.
//  Copyright © 2017年 Zy. All rights reserved.
//

#import "PhysicalRecordCell.h"
#import "Config.h"

@interface PhysicalRecordCell ()

@property (weak, nonatomic) IBOutlet UITextView *textView;

@end

@implementation PhysicalRecordCell

+ (NSString *)registerName {
    return @"PhysicalRecordCell";
}

+ (CGFloat)CellHeightWithText:(NSString *)text {
    CGSize size = [text boundingRectWithSize:CGSizeMake(XHScreenWidth - 32.0f, MAXFLOAT) options:NSStringDrawingTruncatesLastVisibleLine | NSStringDrawingUsesLineFragmentOrigin | NSStringDrawingUsesFontLeading attributes:@{NSFontAttributeName : [UIFont systemFontOfSize:14.0f]} context:nil].size;
    return size.height;
}

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
    self.textView.layer.masksToBounds = NO;
    self.textView.layer.shadowColor = [UIColor lightGrayColor].CGColor;
    self.textView.layer.shadowOffset = CGSizeMake(1.0f, 1.0f);
    self.textView.layer.shadowOpacity = 0.5f;
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];
}

- (void)setCellText:(NSString *)text {
    self.textView.text = text;
}

@end
